% Test the functions makeppftfilter and applyppftfilter.
% The filter is generated without a precondtioner.
%
% Yoel Shkolnisky, December 2010.

explim=7;
for n=2.^(1:explim)
	precision='double';
	if n > 2^(explim-1)
		precision='single';
	end
    A=rand(n,n,n);
    tic;B=optimizedAdjointPPFT3D(optimizedPPFT3D(A,precision),precision);t1=toc;
    
    H=makePPFTFilter3D(n,precision);
    tic;
    C=applyPPFTFilter3D(A,H,precision);
    t2=toc;
    
    err=norm(B(:)-C(:))./norm(B(:));    
    reportTestResult(n,err,t1/t2,precision);    
end
